import type { MypageData } from '../../types/mypage'
const counterReducer = (state = {} as MypageData, action: any) => {
    switch (action.type) {
        case 'user/setToken':
            state.token = action.payload.token
            return state
        case 'user/setUser':
            state = { ...state, ...action.payload }
            return state
        case 'user/cleToken':
            return action.payload
        default:
            return state
    }
}
export default counterReducer